package by.demchenko.sample.services;

import by.demchenko.sample.datamodel.Person;
import by.demchenko.sample.datamodel.Schedule;

import javax.transaction.Transactional;
import java.util.List;

public interface ScheduleService {

    Schedule get(Integer id);

    @Transactional
    void save(Schedule schedule);

    @Transactional
    void saveOrUpdate(Schedule schedule);

    @Transactional
    void delete(Integer id);

    int getCount();

    List<Schedule> getAll();

    List<Schedule> getByTeacher(Person teacher);

    int getCountByTeacher(Person teacher);

    List<Person> getRegisteredStudents(Schedule schedule);
}